﻿Public Class AnimationInfoPfeil
    Inherits ObjektAnimation
    ''' <summary>
    ''' Erstellt einen Laufpfeil am angegeben Feld
    ''' </summary>
    ''' <param name="neuBild"></param>
    ''' <param name="Sound"></param>
    ''' <param name="X"></param>
    ''' <param name="Y"></param>
    ''' <remarks></remarks>
    Public Sub New(ByVal neuBild As String, ByVal Sound As String, ByVal X As Integer, ByVal Y As Integer, ByVal Musikspielen As Boolean, ByVal Schlacht As Integer)
        MyBase.New(Musikspielen, Schlacht)
        FM = False
        Frames = 4
        BildID = LoadTextur(neuBild, 0, "Pfeile")

        If DataSettings.draw3D Then

        ElseIf DataSettings._2D_3D_Malen Then
            InFeldern = True
            P = New Point(X + Texturen(BildID).EinzelbildGroesse.Width / 2 / Hauptmenue.Feldbreite + 0.5, Y - 0.5)
        Else
            InFeldern = False
            P = New Point(X * Hauptmenue.Feldbreite + Texturen(BildID).EinzelbildGroesse.Width / 2, Y * Hauptmenue.Feldbreite)
        End If
        If DataSettings.MusikSound Then
            If My.Computer.FileSystem.FileExists(DataSettings.Resourcenpfad + "Sound\Sound Effects\" + Sound + ".wav") Then
                MusikEngine.LoadWav(DataSettings.Resourcenpfad + "Sound\Sound Effects\" + Sound + ".wav", False)
            End If
        End If
    End Sub
End Class
